$(function(){
				$('#pwl_page').fullpage({
					//绑定菜单
					anchors: ['pwl-page1', 'pwl-page2', 'pwl-page3', 'pwl-page4','pwl-page5'],
					menu: '#menu',

					//导航
					'navigation': true,
					
					resize:true,
					verticalCentered:false,
					afterRender:function(){
//						$('#home').css({'display':'block'}).addClass('home_change');
//						$('#header').before("<div id='header' style='opacity:0'></div>");
						$('#home_icon').css({"margin-top":"180px"});
						$("#home_text1").fadeIn(700,function(){
							$(this).next().animate({width:'800px'},700,function(){
								$("#home_text2").fadeIn(450,function(){
									$(this).next().fadeIn(450,function(){
										$(this).next().fadeIn(450,function(){
											$(this).next().fadeIn(450);
										});
									});
								});
							});
						});
					},
					
					afterLoad:function(anchorLink,index){
						if(index==2){
							$("#about_content h1").after("<div class='title_en'><h2> about me </h2></div>");
							$('.title_en').animate({width:'150px'},800,function(){
								$('.title_en h2').slideDown(400);
							});
							$('#about_more').animate({width:'800px',marginTop:'0',marginBottom:'0'},800,'easeOutElastic',function(){
								$("#about_more p").eq(0).animate({bottom:"0"},700,function(){
									$("#about_more p").eq(1).animate({bottom:"0"},700,function(){
										$("#about_more p").eq(2).animate({bottom:"0"},700,function(){
											$("#about_more p").eq(3).animate({bottom:"0"},700,function(){
												$("#about_more p").eq(4).animate({bottom:"0"},700);
											});
										});
									});
								});
							});
						}
						if(index==3){
							$("#skill_content h1").after("<div class='title_en'><h2> skill </h2></div>");
							$('.title_en').animate({width:'150px'},800,function(){
								$('.title_en h2').slideDown(400);
							});
						}
						if(index==4){
							$("#experience_content h1").after("<div class='title_en'><h2> experience </h2></div>");
							$('.title_en').animate({width:'150px'},800,function(){
								$('.title_en h2').slideDown(400);
							});
						}
						if(index==5){
							$("#demo_content h1").after("<div class='title_en'><h2> demo and test </h2></div>");
							$('.title_en').animate({width:'150px'},800,function(){
								$('.title_en h2').slideDown(400);
							});
						}
					},
					onLeave:function(index){
						if(index==2||index==3||index==4||index==5){
							$(".title_en").remove();	
						}
					}
				});
			});


$('#skill_icon1').click(function() {
	$('#skill_flag1').toggleClass('skill_flag_changed');
	$('#skill_flag2').removeClass('skill_flag_changed');
	$('#skill_flag3').removeClass('skill_flag_changed');
	
	$('#skill_show1').toggle('blind');
	$('#skill_show2').hide('blind');
	$('#skill_show3').hide('blind');

})
$('#skill_icon2').click(function(){
	$('#skill_flag1').removeClass('skill_flag_changed');
	$('#skill_flag2').toggleClass('skill_flag_changed');
	$('#skill_flag3').removeClass('skill_flag_changed');
	
	$('#skill_show1').hide('blind');
	$('#skill_show2').toggle('blind');
	$('#skill_show3').hide('blind');
});
$('#skill_icon3').click(function(){
	$('#skill_flag1').removeClass('skill_flag_changed');
	$('#skill_flag2').removeClass('skill_flag_changed');
	$('#skill_flag3').toggleClass('skill_flag_changed');
	
	$('#skill_show1').hide('blind');
	$('#skill_show2').hide('blind');
	$('#skill_show3').toggle('blind');
});

//图片轮播
$('#experience_scroll_slider').width($('.experience_list').width());
$('#experience_scroll_content').width($('.experience_list').width()*3);
$('#experience_scroll_slider_content').mouseenter(function(){
	$('#experience_turn').stop(true,false).fadeTo(700,1);
}).mouseleave(function(){
	$('#experience_turn').stop(true,false).fadeTo(700,1);
});
var pageIndex = 1;
$('#experience_turn_left').click(function(){
	if(!$('#experience_scroll_content').is(':animated')){
		if(pageIndex==1){
			$('#experience_scroll_content').animate({left:'+=50'},200,function(){
				$(this).animate({left:'-=50'},200);
			});
			return false;
		}
		$('#experience_scroll_content').animate({left:'+='+$('.experience_list').width()});
		pageIndex--;
	}	
})
$('#experience_turn_right').click(function(){
	if(!$('#experience_scroll_content').is(':animated')){
		if(pageIndex==3){
			$('#experience_scroll_content').animate({left:'-=50'},200,function(){
				$(this).animate({left:'+=50'},200);
			});
			return false;
		}
		$('#experience_scroll_content').animate({left:'-='+$('.experience_list').width()});
		pageIndex++;
	}	
})

//公司logo跳转轮播图
$("#experience_line div").click(function(){
		$("#experience_scroll_content").stop(true,false).animate({left:-$(".experience_list").width()*$(this).index()},2000,"easeInOutCubic");
		pageIndex=$(this).index()+1;
		});


//page5更多按钮弹出
$(function() {
    $( "#demo_more_dialog" ).dialog({
      autoOpen: false,
      show: {
        effect: "blind",
        duration: 1000
      },
      hide: {
        effect: "explode",
        duration: 1000
      },
      height:140,
      modal:true
    });
 
    $( "#demo_more_btn" ).click(function() {
      $( "#demo_more_dialog" ).dialog( "open" );
    });
  });
